﻿// ==UserScript==
// @name       feedly
// @namespace  http://use.i.E.your.homepage/
// @version    0.1
// @description  enter something useful
// @match      https://feedly.com/*
// @copyright  2012+, You
// ==/UserScript==
var runs = 0;
window.setTimeout(doClick, 1000);

function doClick() {
    runs++;
    console.log("[feedly userscript] " + runs);

    var lbl = document.getElementById("BBC News_tab_label");

    if (lbl == null) {
        if (runs < 5) {
            window.setTimeout(doClick, 1000);
        }
        else {
            console.log("[feedly userscript] ending: not found after " + runs + " checks");
        }
    }
    else {
        console.log("[feedly userscript] clicking");
        lbl.click();
    }
}